Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  2008  Scripting  Games  Advanced  VBScript  Event  6  

 Content of 2008 Scripting Games Advanced VBScript Event 6.vbs
MD5 Hash: C3F4E667D6EE9CC0069B7F0D9D3034D6
' This is my Solution for the Scripting Games 2008
' For more Information look at
' http://www.microsoft.com/technet/scriptcenter/funzone/games/games08.mspx


Option Explicit

Call Main


' -------------------------------------------------------
Sub Main()
Dim strPrimes
Dim iCount

For iCount = 2 to 200

If IsPrimeNumber(iCount) = true then
strPrimes = strPrimes & iCount & ", "
End if

Next

If Len(strPrimes) then

strPrimes = Left(strPrimes, Len(strPrimes) -2)

msgbox strPrimes, 64, "The Prime-Numbers between 1-200 are:"


End if

End Sub

' -------------------------------------------------------
Private Function IsPrimeNumber(iNumber)
Dim iCount
For iCount = 2 To iNumber - 1
If iNumber Mod iCount = 0 Then
IsPrimeNumber = False
Exit Function
End If
Next
IsPrimeNumber = True
End Function


   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a